{extend name="layout/main-block" /}
<!-- main content start -->
{block name="content"}
<link href="/static/js/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
<section id="main-content">
    <section class="wrapper">
        <div class="row">
            <ol class="breadcrumb">
                <li class="h4"><a href="">修改</a></li>
            </ol>
        </div>
        <div class="row content-main">
            <div class="col-sm-12 col-md-8 col-lg-6">
                <form id="news-add" class="form-horizontal" action="{:url('backend/contact/update',['id'=>$id])}" enctype="multipart/form-data" method="post">
                    <input id="p_id" type="hidden" name="p_id" value="1">
                    <div class="form-group">
                        <label for="inputTitle_cn" class="col-sm-3  col-md-4 col-lg-3 control-label">名称中文</label>
                        <div class="col-sm-9 col-md-8  col-lg-9">
                            <input type="text" name="title_cn" class="form-control" id="inputTitle_cn" value="{$address.title_cn}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputTitle_en" class="col-sm-3 col-md-4 col-lg-3 control-label">名称英文</label>
                        <div class="col-sm-9 col-md-8  col-lg-9">
                            <input type="text" name="title_en" class="form-control" id="inputTitle_en" value="{$address.title_en}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">中文内容</label>
                        <div class="col-sm-9 col-md-8  col-lg-9">
                            <!-- 加载编辑器的容器 -->
                            <script id="ueditor" name="address_cn" type="text/plain">{$address["address_cn"]}</script>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">英文内容</label>
                        <div class="col-sm-9 col-md-8  col-lg-9">
                            <!-- 加载编辑器的容器 -->
                            <script id="ueditor2" name="address_en" type="text/plain">
                            {$address["address_en"]}
                            </script>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-md-offset-4 col-sm-9 col-md-8  col-lg-9">
                            <button type="submit" class="btn btn-primary">修 改</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
</section>
{/block}

{block name="javascript"}
<script type="text/javascript" src="/static/js/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>
<!-- 配置文件 -->
<script type="text/javascript" src="/static/utf8-php/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/static/utf8-php/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('ueditor',{
        initialFrameHeight:"400",
        initialFrameWidth:"1000"
    });
</script>

<!-- 实例化编辑器 -->
<script type="text/javascript">

    //对编辑器的操作最好在编辑器ready之后再做
    ue.ready(function() {
        //设置编辑器的内容
        //ue.focus(true);
        //ue.setContent('heowofejfoe');
        // ue.setContent('');
        //获取html内容，返回: <p>hello</p>
        // var html = ue.getContent();
        //获取纯文本内容，返回: hello
        //var txt = ue.getContentTxt();
        //console.log(txt);
    });
</script>

<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue2 = UE.getEditor('ueditor2',{
        initialFrameHeight:"400",
        initialFrameWidth:"1000"
    });
</script>

<!-- 实例化编辑器 -->
<script type="text/javascript">
    //对编辑器的操作最好在编辑器ready之后再做
    ue2.ready(function() {
        //设置编辑器的内容
        ue2.focus(true);
        //ue.setContent('heowofejfoe');
        // ue2.setContent('');
        //console.log('');
        //获取html内容，返回: <p>hello</p>
        // var html = ue2.getContent();
        //获取纯文本内容，返回: hello
        // var txt = ue2.getContentTxt();
        //console.log(txt);
    });
</script>
<script>
    $(function (){


    });
</script>
{/block}

